<template>
  <h1>我是父组件</h1>

  <!-- 父组件 -->
  <ul >
    <li  v-for="i in list" :key="i">{{ i }}</li>
  </ul>
  <!-- 子组件 -->
  <child-component v-model:list="list"></child-component>

  <!-- v-model就是下面的语法糖的简写形式 -->
  <!-- <child-component :list="list" @update:list="list = $event" /> -->
</template>

<script setup>
import { ref } from 'vue'
import ChildComponent from "./ChildComponent.vue";

const list = ref(['JavaScript', 'HTML', 'CSS'])
</script>

<style lang="less">
</style>
